package com.project.personnel.service.impl;

import com.project.personnel.entity.Employee;
import com.project.personnel.dao.EmployeeMapper;
import com.project.personnel.service.EmployeeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author diaominyh
 * @since 2022-12-12
 */
@Service
public class EmployeeServiceImpl extends ServiceImpl<EmployeeMapper, Employee> implements EmployeeService {
    @Resource
    private EmployeeMapper employeeMapper;

    @Override
    public List<Employee> getAllLink() {
        return employeeMapper.getAllLink();
    }

    @Override
    public List<Employee> getAllList() {
        return employeeMapper.getAllList();
    }

    @Override
    public List<Employee> getAdvanced(Integer current, Integer size, Employee employee, Date[] beginDates) {
        return employeeMapper.getAdvanced(current, size, employee, beginDates);
    }

    @Override
    public Boolean add(Employee employee) {
        return employeeMapper.add(employee) == 1;
    }

    @Override
    public Boolean delete(Integer id) {
        return employeeMapper.delete(id) == 1;
    }

    @Override
    public Boolean updateManual(Employee employee) {
        return employeeMapper.updateManual(employee) == 1;
    }

    @Override
    public Employee getEmployeeById(Integer id) {
        return employeeMapper.getEmployeeById(id);
    }

    @Override
    public Employee getEmployee(Integer id) {
        return employeeMapper.getEmployee(id);
    }

    @Override
    public Integer maxWI() {
        return employeeMapper.maxWI();
    }

    @Override
    public Integer updSalaryById(Integer eid, Integer sid) {
        return employeeMapper.updSalaryById(eid, sid);
    }

    @Override
    public Long getTotal(Employee employee, Date[] beginDate) {
        return employeeMapper.getTotal(employee, beginDate);
    }

    @Override
    public Boolean addMultitude(List<Employee> list) {
        return employeeMapper.addMultitude(list) == 1;
    }

    @Override
    public List<Employee> getAll(Integer pageIndex, Integer pageSize) {
        return employeeMapper.getAll(pageIndex,pageSize);
    }
    @Override
    public int totalCount() {
        return employeeMapper.totalCount();
    }

    @Override
    public List<Employee> getcheckall(Integer current, Integer size) {
        return employeeMapper.getCheckAll(current,size);
    }

    @Override
    public List<Employee> checkListAll() {
        return employeeMapper.checkListAll();
    }
}
